package use.thread.interrupt;

public class InterruptExample {
     static class MyThread1 extends Thread {
        @Override
        public void run() {
            try {
                Thread.sleep(10000);
                System.out.println("Thread run");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) {
        Thread thread = new MyThread1();
        thread.start();
        thread.interrupt();
        System.out.println("main run");
    }
}
